package cn.csm.jwtlogin.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * description: WebMvcConfig <br>
 * date: 2020/10/30 23:09 <br>
 * author: shimi <br>
 * version: 1.0 <br>
 */
@Component
public class WebMvcConfig implements WebMvcConfigurer {

    /**
     * 页面中需要的资源添加资源处理器进行特殊处理
     * 文件磁盘图片url 映射
     *  配置server虚拟路径，handler为前台访问的目录，locations为files相对应的本地路径
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {

//        registry.addResourceHandler("/static/**")
//                .addResourceLocations("classpath:/static/")
//                .addResourceLocations("file:///D:/")
//        ;
    }

}
